package com.hailiang.study.javase.java.math;

import org.junit.Test;

import java.math.BigDecimal;

public class BigDecimal_divideAndRemainder {

    @Test
    public void test_divideAndRemainder_01() {
        BigDecimal b1, b2;
        b1 = new BigDecimal("143.145");
        b2 = new BigDecimal("10.01");

        BigDecimal[] b = b1.divideAndRemainder(b2);
        System.out.println("Division Result:");
        System.out.println("Quotient is " + b[0]); //商值
        System.out.println("Remainder is " + b[1]); // 余数
    }
}
